package com.nuc.utils;

import com.nuc.pojo.Result;

/**
 * @Author Zhang Chao
 * @Date 2021/5/11 11:34
 * @Version 1.0
 */
public class ResultUtils {

    public static Result success(Object data){
        Result result = new Result();
        result.setCode(0);
        result.setData(data);
        result.setMsg("success");
        return result;
    }

    public static Result error(Object data){
        Result result = new Result();
        result.setCode(1);
        result.setData(data);
        result.setMsg("error");
        return result;
    }
}
